package org.zuel.huhuForum;

import com.spring4all.swagger.EnableSwagger2Doc;
import org.junit.Test;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.annotation.PostConstruct;

@SpringBootApplication(scanBasePackages ={"org.zuel.huhuForum"} )
//@MapperScan("org.zuel.huhuForum.dao")
@EnableTransactionManagement
@EnableSwagger2Doc
public class BootDemoApplication {
    /**
     * 解决 Elasticsearch 和 Redis 底层的 Netty 启动冲突问题
     */
    @PostConstruct
    public void init() {
        System.setProperty("es.set.netty.runtime.available.processors", "false");
    }

    public static void main(String[] args ){
        SpringApplication.run(BootDemoApplication.class,args);
    }

}
